package main

import (
	"cloudRestaurant/controller"
	"cloudRestaurant/tool"
	"fmt"
	"github.com/gin-gonic/gin"
)

func main() {
	cfg,err := tool.ParseConfig("./config/app.json")
	if err!=nil{
		fmt.Println(err)
		panic(err.Error())
	}
	app := gin.Default()
	RegisterRouter(app)
	app.Run(cfg.AppHost+":"+cfg.AppPort)
}

// 路由设置
func RegisterRouter(router *gin.Engine){
	new(controller.HelloController).Router(router)
}